﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using GameBase.Form.Control;
using Microsoft.Xna.Framework;

namespace GalaxyPresident
{
    public abstract class Task : GameBase.InvisibleGameEntity
    {
        protected string name = "";
        protected MyControl button;

        public MyControl Button
        {
            get { return button; }
            set { button = value; }
        }
        public string Name
        {
            get { return name; }
            set { name = value; }
        }

        public virtual bool Execute()
        {
            return true;
        }

        private void DefaultCallBack(MyControl sender)
        {
            Execute();
        }
        public void CreateButton(string resString,Color color)
        {
            button = new MyButton(resString,Vector2.Zero);
            button.Color = color;
            button.EnableColor = color;
            button.MouseReleasedCallBack = DefaultCallBack;
            button.ForeColor = PlayingScreen.COLOR_TEXT_TOOLTIP;
        }
    }
}
